Plant information management system

ABSTRACT

In a plant information management system (PIMS,  1 ), data received from a process device (PCC,  10 ) is cached by a data logger ( 2 ) in blocks. A database controller ( 4 ) receives, for each data event, a time string, a value string, and a data quality indicator. The quality indicator is stored by exception only (if “bad”). MSBs of the time string are encoded in a hierarchical database structure of item (process device)—year—day levels. LSBs of the time string, the value string, and quality exceptions are stored as event objects in linked list arrays referenced to a day array object. There is thus no need for an index and the structure provides hierarchical compression.

FIELD OF THE INVENTION

[0001] The invention relates to a plant information management system(PIMS) for industries such as the food, beverage, pharmaceutical, andutility industries.

PRIOR ART DISCUSSION

[0002] One of the major technical problems for many PIMS is that of howto handle the vast quantity of raw data captured from plant equipmentsuch as a pressure sensor. For example, in a typical pharmaceuticalplant there may be tens or even hundreds of thousands of items such astemperature and pressure sensors and valves, for each of which there maybe a value change every second. Also, for each item a high level ofaccuracy is required for data. Such systems, typically run 24×7collecting data from the plant equipment all the time.

[0003] Thus, in general, many PIMS are required to handle very high datarates from plant equipment, to store Terabytes of data, and to allowefficient and user-friendly access to the data for reporting. Forexample, a FDA regulated pharmaceutical plant may be required to storeseven years of plant data online.

[0004] A second major problem is the nature (or shape) of the dataitself. Each value change consists of a time stamp, the actual value anda quality indicator. Because, the data is used to spot trends in theproduct process it is queried by time only i.e. the time stamp in SQLparlance is the primary key.

[0005] Heretofore, one approach has been to use relational database(RDBMS) technology. This technology is widespread in general, and thereis a large skillbase to support it. However it has difficulty handlingvery large volumes of data in the Terabyte range.

[0006] These performance problems are compounded by attempting to usethe time stamp as an index (primary key). In this case, a time-basedquery becomes effectively a table scan. There is therefore a lack ofscalability as the data set size increases.

[0007] These problems have led to use of a hybrid approach in somesystems in which both flat structured files and RDBMS files are used.The process data is stored in flat files with typically one flat fileper time period such as a day or week. Metadata is stored in the RDBMS.This is an improvement over the pure RDBMS approach; however, there isstill a requirement to reduce data volumes by discarding usingstatistical techniques, and rounding of time stamps to second or evenminute resolution all to reduce disk space and hence improve searchtimes at the cost of data accuracy. Another problem is poor performancedue to overhead imposed by the RDBMS layer.

[0008] The invention is therefore directed providing a plant informationmanagement system to address these problems.

SUMMARY OF THE INVENTION

[0009] According to the invention, there is provided a data capturesystem for a plant information management system, the data capturesystem comprising:

[0010] a data logger comprising means for interfacing with a processdevice to receive process data in real time,

[0011] a database controller comprising means for storing said data,characterised in that,

[0012] the database controller comprises means for storing the data in atime-encoded hierarchical object structure with successive hierarchicallevels associated with shorter time periods.

[0013] In one embodiment, the database controller comprises means forstoring data for each measuring point as an event object in lowermostlevels of the hierarchical structure.

[0014] In another embodiment, the database controller comprises meansfor storing the data in linked list arrays.

[0015] In a further embodiment, the database controller comprises meansfor storing item objects at an upper hierarchical level, each said itemobject being associated with a particular process device.

[0016] In one embodiment, the database controller comprises means forstoring a year array object linked to each item object, said year objectcomprising an array of references to day array objects.

[0017] In another embodiment, the database controller comprises meansfor storing an event bucket linked with each day array object, saidevent bucket comprising linked list arrays of data event objects.

[0018] In a further embodiment, the data logger comprises means fordetermining quality of a data event, and for associating a qualityindicator with the data event.

[0019] In one embodiment, the database controller comprises means forstoring the quality indicator only if it is exceptional.

[0020] In another embodiment, the database controller comprises meansfor storing an event object as time and value strings in one array 23(b)and exceptional quality indicators in a linked array 23(c).

[0021] In a further embodiment, the database controller comprises meansfor defining the database structure according to a breakdown of bits ofa time value for a data event, with most significant bits beingassociated with higher hierarchical levels.

[0022] In one embodiment, the database controller comprises means forstoring only least significant bits of the time value in the data event,the most significant bits being encoded in the database hierarchicalstructure.

[0023] In another embodiment, the data logger comprises means forcaching received event data.

[0024] In a further embodiment, the data logger comprises means forcaching the event data intact in blocks which are linked liststructures.

[0025] In one embodiment, the data logger comprises means for allocatinga fresh linked list initially and for subsequently transferring flushedblocks to the fresh linked list to avoid the need to destroy flushedblocks and create fresh blocks after a data flush operation.

[0026] In a further embodiment, the data logger comprises means forinserting a time stamp in each block of the fresh linked list and forperiodically destroying blocks which have been unused for a time periodexceeding a threshold.

[0027] In another aspect, the invention provides a plant informationmanagement system comprising a data capture system as defined above.

DETAILED DESCRIPTION OF THE INVENTION BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The invention will be more clearly understood from the followingdescription of some embodiments thereof, given by way of example onlywith reference to the accompanying drawings in which:

[0029]FIG. 1 is a schematic representation of a PIMS of the inventionconnected to a PLC; and

[0030]FIG. 2 is a diagrammatic representation of the database structure.

DESCRIPTION OF THE EMBODIMENTS

[0031] Referring to the drawings, there is shown a plant informationmanagement system 1 connected for capture of process control data from aPLC 10. The system 1 comprises a data logger 2 connected to a memorycache 3. The data logger 2 is also connected to a database controller 4,in turn connected to an object database 5.

[0032] The raw events which are received by the data logger 2 are notreceived at a uniform rate, as this depends on the nature of the processactivity. The process activity may, for example, be brewing orelectricity generation. To deal with this non-uniformity, the datalogger 2 uses the cache 3 as a buffer. It stores raw events in objects,each object stored in linked lists of blocks, each block being an arrayof up to 500 raw events.

[0033] The system 1 also comprises clients 7, and a configurationutility 8 interconnected on a LAN 9. The clients render the query datato the end user (trends). The configuration utility 8 is used toconfigure the parameters of the system (e.g. which PLCs to connect to).The LAN is used to connect the software components together forcommunication purposes.

[0034] The controller 4 stores the data in the object database 5 inwhich:

[0035] there is one “item” object per data source (e.g. pressuresensor), and multiple event objects associated with each item object;

[0036] the event objects are stored as linked lists of arrays;

[0037] each event object has time, value, and quality data fields;

[0038] the quality field is stored by exception only; and

[0039] part of the time stamp is encoded in the database structure,which is hierarchical according to time periods.

[0040] Referring to FIG. 2, the database 5 is illustrated. The upperlevel has item objects 20, each linked to a year array level 21 ofYearArray objects to a level 22 of DayArray objects, and to aBaseEventBucket array level 23. Each YearArray object is linked with 365DayArray objects in the level 22. Each DayArray object is linked with 24EventBuckets in the level 23. The structure of the EventBucket level 23is also shown in FIG. 2. It comprises an EventBucket, EventTuple, andExceptionQuality arrays. One event object comprises the time and valuefields of the EventTuple array, and an exception quality value in theExceptionQuality array.

[0041] This database structure saves approximately six bytes of storageper event compared to previous approaches. It allows very fastsearching, with access to an hour of interest in a limited and fixednumber of steps. This is because the database structure itself is theindex and there is no need for RDBMS indexes. This latter featureeffectively provides hierarchical compression. It has been found thatthe database 5 allows writing of greater than 300,000 events per secondand reading of greater than 1 million events per second.

[0042] In more detail, each raw event comprises a 64-bit time stamp, avariable length event value, and a 16-bit quality value. The data logger2 uses the maximum available physical memory for the cache, and withinthe allocated memory it creates empty lists at the start of datacapture. Each block of each list includes a time stamp indicating whenit was created and the time stamp is subsequently updated during datacapture to indicate when the block was last used. As blocks become fullof raw events, the data is flushed out to the database 5 via thecontroller 4. The data logger avoids the (time-consuming) requirementfor destroying and creating blocks at flush operations by instead simplyadding flushed blocks to a free list. Periodically, the data is flushedand the block is added to the free list.

[0043] The data logger 2 also operates to minimise the amount ofallocated cache memory at any point in time. The purpose of this featureis to ensure that there is sufficient available memory to cope at timeswhen there is an inordinately high volume of raw events outputted by thePLC. An example of such a situation is occurrence of a fire at some ofthe process control equipment. Minimisation of allocated cache memory isachieved by periodically reading the block time stamps of the freelinked list. All of the blocks which are older than a pre-set timeperiod are automatically deleted. In this way, the linked lists have agood deal of capacity to accept new blocks.

[0044] As the raw events are flushed through the controller 4, eventswhich have a value of bad (anything other than 0×C0) in the qualityfield are flagged. The purpose of this is to store the exception data inthe database 5 as described below, but not to store any quality value ifthe quality is good. On the basis that most raw events have good qualityindicators in the quality field, their approach minimises the amount ofdata stored.

[0045] This database structure is particularly effective. The itemobject stores references to the lower level objects and so fetches toretrieve the last objects captured are simple and quick. The fact thatthe least significant 32 time bits are stored at the event leveloptimise storage overhead and reduces fetch cycle time. These lower 32bits represent a 71.5 minute window for each bucket 23, used torepresent (rounded) to one hour.

[0046] Querying data is a very efficient operation. All queries are timebased. Since most queries will be based on recent data, the startingpoint of the query is the current year array. Using the starting datefor the query, the database abstraction layer 4 drills down through theschema to search for the requested event. Once that has beenaccomplished, the client can retrieve all subsequent events, one at atime, until it has retrieved all the desired events.

[0047] The item class describes the items that are defined for nodes.Data for items on OPC servers use the VARIANT data type, and data foritems on DDE servers are converted to the type defined at item level. Anitem's data type enumeration directly matches the VARIANT data types,but are stored using specified data types. Array's of events, i.e.VARIANTs of type VT_ARRAY, are stored as separate events with the sametimestamp.

[0048] Items can also receive alarm event (variable sized) structures.Items have non-specific placeholders for storing additional data withoutrequiring schema updates. This is implemented as a reference to a linkedlist of attribute objects. The Item class also contains references tothe last YearArray, DayArray, EventBucket, AlarmEventBucket andAnnotation objects. These references allow for efficient location ofobjects that need updating when inserting data into the database.

[0049] The following are examples of data types. TABLE 1 Native datatypes and VARIANT data types Native Data Type VARIANT Data TypeooVString VT_BSTR int8 VT_I1 uint8 VT_BOOL, VT_UI1 int16 VT_INT, VT_I2uint16 VT_UINT, VT_UI2 int32 VT_I4 uint32 VT_UI4 float32 VT_R4 int64VT_I8, VT_CY uint64 VT_UI8 float64/double VT_R8 Decimal VT_DECIMAL (14bytes)

YearArray 21

[0050] The YearArray class is used to access all the event objects thathave been recorded for an item over a period of a year, via an array of366 references to DayArray objects. The Item class 20 contains areference its first YearArray. The YearArray class containsbi-directional references to the next and previous YearArrays. Areference to the first YearArray is stored in the item object, to allowone to iterate through all the YearArray objects for an item.

Relationships

[0051] Next/Prev

[0052] Next/Prev are bi-directional one-to-one references, to YearArrayobjects, for iterating through all the YearArrays for an item.

[0053] DayArray

[0054] DayArray is an array of 366 references to DayArray objects foreach day for an item.

Attributes

[0055] Year

[0056] The year attribute specifies which year the YearArray represents.

DayArray 22

[0057] The DayArray class is used to access all the event objects thathave been recorded for an item over a period of a day, via an array of24 references to the first EventBucket derived objects that are createdat the start of each hour in a day. Bi-directional references to thenext and previous DayArrays are used to allow one to iterate through allthe DayArray objects for an item. The DayArray class also containsreferences to the first Annotation and AlarmEventBucket objects for eachday. These objects could be referenced via the array of references toEventBucket derived objects, but this would mean that for each itemdifferent types of EventBucket derived objects could exist together andtherefore the objects would have to be checked to see what type they areeach time they are referenced. It is expected that alarm events andannotations occur infrequently.

EventBucket

[0058] The EventBucket is a base class, which in its derived formcontains an embedded array of event objects. The class containsbidirectional references to the next and previous EventBuckets, to allowfor efficient iteration through all events for an item. The class alsocontains a reference to a linked list of ExceptionQuality objects and aDWORD for holding the upper 32 bits of the event time's FILETIMEstructure, which reduces the storage required for each event. The sizeof each event object is minimised by only storing the lower 32 bits ofthe FILETIME at event level, the upper 32 bits of the FILETIME arestored at the EventBucket level. However, if the maximum accuracy of theFILETIME structure is used, then the lower 32 bits of the FILETIME givesa range of 71.5 minutes. New EventBucket objects are required if thisrange expires, even if the current EventBucket object is not full. Sincethe quality flag for each event is nearly always the same, i.e.OPC_QUALITY_GOOD (0×C0), this is only stored on exception basis as alinked list of ExceptionQuality objects referenced from the EventBucket.

StringEventBucket 23(a)

[0059] The StringEventBucket is derived from the EventBucket class, andit requires special handling as strings are stored as ooVArrays ofcharacters. The normal EventBucket implementation uses ooVArrays tostore the data, but Objectivity does not permit ooVArray to be embeddedwithin another ooVArray. Therefore the StringEventBucket implementationuses a fixed size array. The fixed array is implemented using aFixedArray template class which exposes identical methods to anooVArray. This allows the templated code which deals with events in thedatabase module, to treat all event data identically.

Attributes

[0060] StringArray

XXXXEventBucket 23(a)

[0061] XXXXEventBucket classes are derived from the EventBucket class. Aseparate XXXXEventBucket class is defined for each of the Objectivitynative data types as described in Table 1, above. The XXXXEvents areembedded into the XXXXEventBucket objects using ooVArrays.

Attributes

[0062] Array

BaseEvent 23

[0063] The BaseEvent class is a non-persistent capable class and it isthe base class for the XXXXEvent classes.

Attributes

[0064] TimeLow

[0065] The TimeLow attribute specifies lower DWORD of the event time.

XXXXEvent

[0066] The XXXXEvent classes are non-persistent capable classes, whichrepresent the actual event data, they are derived from the BaseEventclass. Separate XXXXEventBucket classes are defined for each of theObjectivity native data types as described in Table 1, above.

Attributes

[0067] Value

ExceptionQuality 23(c)

[0068] The ExceptionQuality class represents the quality flag forevents. Quality is stored on an exception basis when the value is notOPC_QUALITY_GOOD (0×00C0). Each object contains a two byte quality flagand an index value.

Relationships

[0069] Next

[0070] Next is a reference to the next ExceptionQuality object in thelinked list for an EventBucket.

Attributes

[0071] ID

[0072] The ID attribute is used to correlate ExceptionQuality objectswith event objects, which are embedded in an array in the EventBucket.

[0073] Value

[0074] As defined in the OPC Data Access specification.

[0075] It will be appreciated that the invention provides for very fastdata access because of the hierarchical compression in which the timestring MSBs are encoded in the structure, abviating the need forindexes. Also, this structure saves approximately 6 bytes of storage perevent. This has been achieved without loss of time precision. Thedatabase controller 4 has been found to achieve a writing performance ofgreater than 300,000 events per second and a reading performance ofgreater than 1 million events per second.

[0076] The invention is not limited to the embodiments described but maybe varied in construction and detail.

1. A data capture system for a plant information management system, thedata capture system comprising: a data logger (2) comprising means forinterfacing with a process device to receive process data in real time,a database controller (4) comprising means for storing said data,characterised in that, the database controller comprises means forstoring the data in a time-encoded hierarchical object structure (3)with successive hierarchical levels (20-23) associated with shorter timeperiods.
 2. A data capture system as claimed in claim 1, wherein thedatabase controller (4) comprises means for storing data for eachmeasuring point as an event object in lowermost levels (23) of thehierarchical structure.
 3. A data capture system as claimed in claim 1,wherein the database controller (4) comprises means for storing the datain linked list arrays.
 4. A data capture system as claimed in claim 1,wherein the database controller (4) comprises means for storing itemobjects at an upper hierarchical level, each said item object beingassociated with a particular process device.
 5. A data capture system asclaimed in claim 4, wherein the database controller (4) comprises meansfor storing a year array object (21) linked to each item object (20),said year object (21) comprising an array of references to day arrayobjects.
 6. A data capture system as claimed in claim 5, wherein thedatabase controller (4) comprises means for storing an event bucket (23)linked with each day array object, said event bucket comprising linkedlist arrays of data event objects.
 7. A data capture system as claimedin claim 1, wherein the data logger (2) comprises means for determiningquality of a data event, and for associating a quality indicator withthe data event.
 8. A data capture system as claimed in claim 7, whereinthe database controller (4) comprises means for storing the qualityindicator only if it is exceptional.
 9. A data capture system as claimedin claim 8, wherein the database controller comprises means for storingan event object as time and value strings in one array 23(b) andexceptional quality indicators in a linked array 23(c).
 10. A datacapture system as claimed in claim 1, wherein the database controller(4) comprises means for defining the database structure according to abreakdown of bits of a time value for a data event, with mostsignificant bits being associated with higher hierarchical levels.
 11. Adata capture system as claimed in claim 10, wherein the databasecontroller (4) comprises means for storing only least significant bitsof the time value in the data event, the most significant bits beingencoded in the database hierarchical structure.
 12. A data capturesystem as claimed in claim 1, wherein the data logger (2) comprisesmeans for caching received event data.
 13. A data capture system asclaimed in claim 12, wherein the data logger (2) comprises means forcaching the event data intact in blocks which are linked liststructures.
 14. A data capture system as claimed in claim 13, whereinthe data logger (2) comprises means for allocating a fresh linked listinitially and for subsequently transferring flushed blocks to the freshlinked list to avoid the need to destroy flushed blocks and create freshblocks after a data flush operation.
 15. A data capture system asclaimed in claim 1, wherein the data logger (2) comprises means forinserting a time stamp in each block of the fresh linked list and forperiodically destroying blocks which have been unused for a time periodexceeding a threshold.
 16. A plant information management systemcomprising a data capture system as claimed in claim
 1. 17. A computerprogram product comprising software code for performing operations of adata capture system as claimed in claim 1 when executing on a digitalcomputer.